import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import echarts from "echarts";
import axios from "axios";
import "./assets/css/global.less";
import "../public/static/theme/chalk.js";
import "../public/static/theme/vintage.js";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import SocketService from "@/utils/socket_service";

//对服务端进行WebSocket的连接
SocketService.Instance.connect();
Vue.prototype.$socket = SocketService.Instance;

Vue.use(ElementUI);

Vue.config.productionTip = false;
Vue.prototype.$echarts = echarts;

axios.defaults.baseURL = "http://127.0.0.1:8888/api/";

Vue.prototype.$http = axios;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
